# coding = 'utf-8'
"""
  获取图片集 并且生成图片列表
"""

import os
#paths=['coco2014','Stanford','vehicleplate']
paths=['../data/labels']
f=open('../data/train_all.txt', 'w')
for path in paths:
    p=os.path.abspath(path)
    filenames=os.listdir(p)
    for filename in filenames:
        im_path='../data/labels/'+filename
        print(im_path)
        read = open(im_path, 'r')
        #print(read.readline())
        line = read.readline()
        line = line.split('\n')[0]
        f.write(filename.split('.')[0]+' '+line+ '\n')
        read.close()
f.close()